package cn.njxzc.examples;

import java.util.HashSet;

public class Exam8_3 {

	@SuppressWarnings({ "rawtypes", "unchecked" })
	public static void main(String[] args) {

		HashSet uniques = new HashSet();

		HashSet dups = new HashSet();

		for (int i = 0; i < args.length; i++)

			if (!uniques.add(args[i]))

				dups.add(args[i]);

		uniques.removeAll(dups);

		System.out.println("不同的单词: " + uniques);

		System.out.println("重复的单词: " + dups);

	}

}